package com.dyna.foundation.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dyna.constants.DateFatter;
import com.dyna.domain.req.InsertValidateGroup;
import com.dyna.domain.req.UpdateValidateGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ApiModel("sys_dict_data")
public class SysDictData implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @NotNull(message = "字典数据主键不能为空", groups = {UpdateValidateGroup.class})
    private Integer dictId;
    
    @ApiModelProperty("字典类型")
    @NotBlank(message = "字典类型不能为空", groups = {UpdateValidateGroup.class, InsertValidateGroup.class})
    private String dictType;

    
    @ApiModelProperty("字典值")
    @NotBlank(message = "字典值不能为空", groups = {UpdateValidateGroup.class, InsertValidateGroup.class})
    private String dictValue;

    
    @ApiModelProperty("字典排序")
    @NotNull(message = "排序值不能为空", groups = {UpdateValidateGroup.class, InsertValidateGroup.class})
    private Integer dictSort;

    
    @ApiModelProperty("字典标签")
    @NotNull(message = "字典标签不能为空", groups = {UpdateValidateGroup.class, InsertValidateGroup.class})
    private String dictLabel;


    @ApiModelProperty(value = "颜色类型，default、primary、success、info、warning、danger", example = "default")
    private String colorType;

    @ApiModelProperty(value = "css 样式", example = "btn-visible")
    private String cssClass;


    @ApiModelProperty(value = "状态", notes = "0:正常, 1:停用")
    @NotNull(message = "状态不能为空", groups = {UpdateValidateGroup.class, InsertValidateGroup.class})
    private Integer status;

    
    @ApiModelProperty("0未删除，2已删除")
    private Integer delFlag;

    
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime createTime;

}